package com.maishi.programmer.shejimoshi.jisuanqi_factory;

/**
 * Created by brossdong on 2018/5/6.
 */
public class OperationDiv extends Operation {

    @Override
    public double GetResult() {
        double res = 0;
        if (numberB == 0) {
            try {
                throw new Exception("分母不能为0");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        res = numberA / numberB;
        return res;
    }
}
